const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      '/v2': {
        target: 'https://api.xmonster.cn/',
        headers: {
          'user-agent': 'letsgo&4.3&android&23&wifi',
          'located-city-name': '%E4%B8%8A%E6%B5%B7'
        }
      }
    }
  },
  css: {
    loaderOptions: {
      less: {
        // 若 less-loader 版本小于 6.0，请移除 lessOptions 这一级，直接配置选项。
        lessOptions: {
          modifyVars: {
            // 此处修改样式
            // 直接覆盖变量或者通过 less 文件覆盖
            'toast-loading-icon-color': '#d94648',
            'toast-text-color': '#d94648',
            'toast-background-color': 'rgba(70,30,35,0.5)',
            'loading-spinner-size': '45px',
            'list-text-color': '#d94648',
            'swipe-indicator-active-background-color': '#d94648',
            'swipe-indicator-inactive-background-color': '#fff',
            'swipe-indicator-inactive-opacity': 1
          }
        }
      }
    }
  }
})
